home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / demo / client / scripts / fpsGui.cs < prev    next >
Encoding:
Text File  |  2005-11-23  |  962 b   |  36 lines

  1. //-----------------------------------------------------------------------------
  2. // Torque Game Engine 
  3. // Copyright (C) GarageGames.com, Inc.
  4. //-----------------------------------------------------------------------------
  5.  
  6. //-----------------------------------------------------------------------------
  7. // FpsGui is the main TSControl through which the racing game is viewed.
  8. // The FpsGui also contains the hud controls.
  9. //-----------------------------------------------------------------------------
  10.  
  11. function FpsGui::onWake(%this)
  12. {
  13.    // Turn off any shell sounds...
  14.    // alxStop( ... );
  15.  
  16.    $enableDirectInput = "1";
  17.    activateDirectInput();
  18.  
  19.    // Message hud dialog
  20.    Canvas.pushDialog(MainChatHud);
  21.    chatHud.attach(HudMessageVector);
  22.  
  23.    // Push the game's action key mapings
  24.    moveMap.push();
  25. }
  26.  
  27. function FpsGui::onSleep(%this)
  28. {
  29.    Canvas.popDialog(MainChatHud);
  30.    
  31.    // Pop the keymaps
  32.    moveMap.pop();
  33. }
  34.  
  35.  
  36.